package com.practice.mapper.admin;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.practice.pojo.admin.entity.User;
import com.practice.pojo.admin.vo.AdminUserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminUserMapper extends BaseMapper<User> {
    void add(User user);

    @Select("select * from sys_user where id = #{id}")
    AdminUserVO rowInfo(String id);

    @Select("select role_id from sys_user where id = #{id}")
    String getByRoleId(String id);

    @Select("select menu_id from sys_role_menu where role_id = #{roleId}")
    List<String> getByRoleName(List<String> roleId);
}
